package com.open.account.interfaces.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.open.account.interfaces.dto.OpenAccountInfoDetailRespDto;
import com.open.account.interfaces.dto.Result;
import com.open.account.interfaces.param.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Api(value = "开户管理后台接口", tags = "开户管理后台接口")
@ApiSort(value = 2)
@RestController
@RequestMapping(path = "/open-account-manager")
public class OpenAccountManagerController {

    @ApiOperation(value = "查询开户申请列表", notes = "查询开户申请列表")
    @ApiOperationSupport(order = 1)
    @PostMapping("openAccountInfoList/v1")
    public Result<PageResponse<OpenAccountBasicInfo>> openAccountInfoList(@RequestBody @Validated OpenAccountInfoListReq openAccountInfoListReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new PageResponse<>());
    }

    @ApiOperation(value = "查询开户申请详情", notes = "查询开户申请详情")
    @ApiOperationSupport(order = 2)
    @PostMapping("openAccountInfoDetail/v1")
    public Result<OpenAccountInfoDetailRespDto> openAccountInfoDetail(@RequestBody @Validated BaseAccountIdReq baseAccountIdReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(new OpenAccountInfoDetailRespDto());
    }

    @ApiOperation(value = "标记字段信息", notes = "标记字段信息")
    @ApiOperationSupport(order = 3)
    @PostMapping("markField/v1")
    public Result<Boolean> markField(@RequestBody @Validated FieldFlagInfo fieldFlagInfo,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }

//    @ApiOperation(value = "保存审核人员修改的开户信息", notes = "保存审核人员修改的开户信息")
//    @PostMapping("saveOpenAccountInfo/v1")
//    public Result<Boolean> saveOpenAccountInfo(@RequestBody @Validated OpenAccountInfoDetail openAccountInfoDetail,@RequestHeader("User-Session") String userSession) {
//        return Result.success(Boolean.TRUE);
//    }

    @ApiOperation(value = "审核", notes = "审核")
    @ApiOperationSupport(order = 4)
    @PostMapping("openAccountAudit/v1")
    public Result<Boolean> openAccountAudit(@RequestBody @Validated OpenAccountAuditReq openAccountAuditReq,@RequestHeader("User-Session") String userSession) {
        return Result.success(Boolean.TRUE);
    }
}
